/**
 * @author: zhiqiang
 * @version: 1.0
 * @date: 2022/3/17
 * @description:
 */
package com.lzq.mediator.improved;

public class Alarm extends Colleague {

    public Alarm(Mediator mediator, String name) {
        super(mediator, name);
        mediator.Register(this, "alarm");
    }

    @Override
    public void sendMessage(int state) {
        this.getMediator().getMessage(state, "alarm");
    }

    public void startAlarm() {
        System.out.println("闹钟响了");
    }
}
